<template>
  <div class="title">
    <div class="listBox">
      <span style="float: left">开店就找店掌柜</span>
      <div class="ulBox">
        <ul class="uiList">
          <li class="login" @click="$router.push('/setting/myshop')" v-if="!accountShow">{{upUser.nick}}</li>
          <li style="color:rgba(228,30,29,1);margin-right: 30px" @click="goLogin" v-else>您好，请登录</li>
         <!-- <li @click="goRegister" v-if="accountShow">免费注册</li>
          <li>|</li>-->
         <!-- <li>
            <div class="titSelect">
              <el-select v-model="collectionValue" placeholder="请选择" style="background:#F4F4F4;">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </li>
          <li>|</li>
          <li>
            <div class="titSelect">
              <el-select v-model="myOrder" placeholder="请选择" style="background:#F4F4F4;">
                <el-option
                  v-for="item in myOrderOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </li>
          <li>|</li>-->
         <!-- <li @click="goWx"><img style="width: 24px" src="../../static/img/wx.png" alt="winxin"></li>
          <li @click="goSj"><img style="width: 12px" src="../../static/img/sj.png" alt="souji"></li>-->
        </ul>
      </div>

    </div>

  </div>
</template>

<script>
  export default {
    name: "hearder",
    data() {
      return {
        collectionValue: '浏览收藏',
        myOrder: '交易订单',
        options: [
          {
            value: "个人中心",
            label: "个人中心"
          },
          {
            value: "个人资料",
            label: "个人资料"
          },
          {
            value: "我的收藏",
            label: "我的收藏"
          },
          {
            value: "浏览历史",
            label: "浏览历史"
          },
          {
            value: "意见反馈",
            label: "意见反馈"
          },
        ],
        myOrderOptions: [
          {
            value: "交易订单",
            label: "交易订单"
          }, {
            value: "我的交易",
            label: "我的交易"
          }, {
            value: "我的服务",
            label: "我的服务"
          },
        ],
      };
    },
    computed: {
      accountShow() {
        return this.$store.state.loginBtn;
      },
      upUser() {
        return this.$store.state.userInfo;
      }
    },
    created() {
    },
    methods: {
      goLogin() {
        this.$router.push('/login')
      },
      goRegister() {

      },
      goWx() {

      },
      goSj() {

      }
    }
  }
</script>

<style scoped lang="less">
  .title {
    height: 40px;
    line-height: 40px;
    background: #F4F4F4;
    overflow: hidden;
    width: 100%;

    .listBox {
      width: 1200px;
      height: 100%;
      margin: 0 auto;
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(153, 153, 153, 1);

      .ulBox {
        float: right;

        .uiList {
          display: inline-block;

          li {
            float: left;
            margin-left: 20px;
            cursor: pointer;

            img {
              margin-top: 10px;
            }
          }
        }
      }

    }

  }
  .login {
    color: #e41e1d;
    font-size: 18px;
    cursor: pointer;
  }

</style>
